package entity

/**
* @author aFun
* @data 2025/4/10 01:01
* @email: afunaaa222@163.com / 1030935903
* @address: Guangdong University of Technology, China
 */

import (
	"fmt"
	"github.com/jinzhu/gorm"
)

type Role struct {
	gorm.Model
	Lev    int8  `gorm:"default:0"` // 等级
	Asset  int64 `gorm:"default:0"` // 资产
	Tokens int64 `gorm:"default:0"` // 拥有代币数
	// [Item, Item, ...]
	Bags       ItemList  `gorm:"type:json"` // 背包
	Lucky_draw LuckyDraw // 抽奖记录
}

func (role *Role) String() string {
	return fmt.Sprintf("Role{lev:%d,asset:%d,tokens:%d,bags:%s}",
		role.Lev, role.Asset, role.Tokens, role.Bags)
}
